feat(telemetry): add dynamic "db.system" attribute to OTEL spans#5019
Merged
feat(telemetry): add dynamic "db.system" attribute to OTEL spans#5019
Conversation
jkomyno
commented
Oct 16, 2024
Comment on lines
+20
to
+22
| fn system_name(&self) -> &'static str { | ||
| self.name() | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This is only used in query-engine/core/src/executor/execute_operation.rs.
For other metrics spans, the logic lives in:
provider = "mongodb":query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs`- SQL providers: their corresponding
quaintnative module.
jkomyno
commented
Oct 16, 2024
jkomyno
commented
Oct 16, 2024
Contributor
WASM Query Engine file Size
|
aqrln
reviewed
Oct 16, 2024
aqrln
reviewed
Oct 16, 2024
…nge member variable to constant
CodSpeed Performance ReportMerging #5019 will not alter performanceComparing Summary
|
aqrln
reviewed
Oct 18, 2024
query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs
Outdated
Show resolved
Hide resolved
aqrln
reviewed
Oct 18, 2024
aqrln
reviewed
Oct 18, 2024
aqrln
reviewed
Oct 18, 2024
aqrln
reviewed
Oct 18, 2024
query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs
Outdated
Show resolved
Hide resolved
aqrln
reviewed
Oct 18, 2024
query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs
Outdated
Show resolved
Hide resolved
…t_queries/mod.rs Co-authored-by: Alexey Orlenko <alex@aqrln.net>
aqrln
approved these changes
Oct 21, 2024
Member
aqrln
left a comment
There was a problem hiding this comment.
Looks good! A couple more nits, and fix the rustfmt issue, and feel free to merge afterwards 💯
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR closes prisma/prisma#21472.
It applies the
db.systemattribute tometricsspans accoding to https://opentelemetry.io/docs/specs/semconv/database/database-spans/.Here's the breakdown of how
db.systemis set for each connector:provider = "postgres"→ `db.system = "postgresql"provider = "cockroachdb"→ `db.system = "cockroachdb"provider = "mysql"→db.system = "mysql"db.system = "mariadb"at this moment.provider = "sqlite"→db.system = "sqlite"provider = "sqlserver"→db.system = "mssql"provider = "mongodb"→db.system = "mongodb"Closes OTEL-237.
/integration